<?php slot('productPreview') ?>
<?php use_javascript('/project_css_js/js/basket.js'); ?>
<div id="product-preview">
<?php foreach($groups as $key=>$group): ?>
    
<div class="one_third <?php echo fmod($key+1, 3) == 0 ? 'last' : '' ?>">
	<div class="item">
		<div class="portfolio_img_holderr">

			<a class="" href="<?php echo $groupLinks[$group['id']] ?>">
			    <img src="<?php echo @myPicture::getInstance($group['picture'])->thumbnail(276,338,'center')->url() ?>" alt="" />
			</a>
		</div>
			<h3 class="portfolio"><a href="<?php echo $groupLinks[$group['id']] ?>"><?php echo $group['Translation'][$sf_user->getCulture()]['name'] ?></a></h3>
                        <?php foreach($group->getProducts() as $product): ?>
                        <?php $product = $product->getProduct() ?>
                            <input type="radio" data-url="<?php echo $productPageHelper->basketLink($product) ?>" name="group-<?php echo $group->getId();?>" id="prod-<?php echo $product->getId();?>" />
                            <label for="prod-<?php echo $product->getId();?>"><?php echo $product['Translation'][$sf_user->getCulture()]['description'] ?>  <span class="pricesmall"><?php echo $product->getPrice();?> EUR</span></label><br/>
                        <?php endforeach; ?>
			    <div class="clearboth"></div>
			<span><a style="margin-top:15px;" class="button_link addToBasket" href="#"><span><?php echo __('Soovin tellida'); ?></span></a></span>
		</div>
	<div class="clearboth"></div>
</div><!-- one_third -->

<?php endforeach; ?>
<div class="clearboth"></div>
</div>
<script type="text/javascript">
    jQuery('.addToBasket').addProductToBasket({loading: '<?php echo __('loading'); ?>'});
</script>
<?php end_slot() ?>